package com.lkbaby.home.controller.impl;

import com.lkbaby.home.controller.ContentController;
import com.lkbaby.home.entity.Content;
import com.lkbaby.home.service.ContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * (Content)表控制层
 *
 * @author makejava
 * @since 2022-09-21 09:41:55
 */
@CrossOrigin
@RestController
@RequestMapping("/content")
public class ContentControllerImpl implements ContentController {

	@Autowired
	private ContentService contentService;

	/**
	 * 查询content列表信息
	 *
	 * @return
	 */
	@Override
	@RequestMapping("/queryList")
	public List<Content> queryList() {
		return contentService.queryList();
	}

	/**
	 * 新增content信息
	 *
	 * @param content
	 * @return
	 */
	@Override
	@RequestMapping("/insert")
	public boolean insert(@RequestBody Content content) {
		return contentService.insert(content);
	}

	/**
	 * 更新content信息
	 *
	 * @param content
	 * @return
	 */
	@Override
	@RequestMapping("/update")
	public boolean update(@RequestBody Content content) {
		return contentService.update(content);
	}

	/**
	 * 删除content信息
	 *
	 * @param content
	 * @return
	 */
	@Override
	@RequestMapping("/remove")
	public boolean remove(@RequestBody Content content) {
		return contentService.remove(content);
	}
}

